<script type="text/javascript">

	function deletePhotoClicked() {
		var photoUploadField = getElementWithId('photoUploadField');
		if(photoUploadField != null)
			photoUploadField.value = "";
		var photoUploadDiv = getElementWithId('photoUpload');
		if(photoUploadDiv != null)
			photoUploadDiv.hide();
		var delPhotoDiv = getElementWithId('deletePhoto');
		if(delPhotoDiv != null) {
			var src = "<input type=\"hidden\" name=\"deletePhoto\" value=\"1\" />{html_person_will_deletepic}";
			delPhotoDiv.innerHTML = src;
		}
	}
	
</script>
<div class="personProfile">
<div class="editView" >
<div class="profile">

<form method="post" enctype="multipart/form-data" action="{link_update}">
	<input type="hidden" name="action" value="update" />
	{errorBoxHtml}

	<div class="measureWidth" id="_measureWidth_{tmpId}"></div>

	<table class="form persontable" id="_formTable_{tmpId}">
		<tr>
			<td class="indent profilePic" rowspan="5">
				<div class="profilePicContainer"><img class="profilePic" alt="photo" src="{photoUrl}" title="" /></div>
			</td>
			<td class="field"><span class="label">{html_person_field_title}</span></td>
			<td class="value"><select name="title" >{form_title}</select></td>
		</tr>
		<tr class="{surnameRequiredClass}">
			<td class="field"><span class="label">{html_person_field_surname}</span></td>
			<td class="value"><input type="text" name="surname" value="{form_surname}" /> <span class="help" look="width: 400px">{html_person_field_surname_help}</span></td>
		</tr>
		<tr class="required">
			<td class="field"><span class="label">{html_person_field_firstname}</span></td>
			<td class="value"><input type="text" name="firstname" value="{form_firstname}" /> <span class="help" look="width: 400px">{html_person_field_firstname_help}</span></td>
		</tr>
		<tr>
			<td class="field"><span class="label">{html_person_field_gender}</span></td>
			<td class="value"><select name="gender" >{form_gender}</select></td>
		</tr>
		<tr class="photo">
			<td class="field"><span class="label">{html_person_field_photo}</span></td>
			<td class="value">
				<div id="photoUpload">
					<input id="photoUploadField" type="file" class="file" name="photoFile" value="" /> <span class="help" look="width: 400px">{html_person_field_photo_help}</span><br/>
				</div>
				<!-- BEGIN deletePhoto -->
				<div id="deletePhoto">
				<a href="#" onclick="deletePhotoClicked(); return false;">{html_person_link_deletepic}</a>
				</div>
				<!-- END deletePhoto -->
			
			</td>
		</tr>
		<tr class="endSeparator">
			<td colspan="2">&nbsp;</td>
		</tr>
		
		<tr>
			<td colspan="3"><div class="separator"></div></td>
		</tr>
		<tr class="sectionSeparator lightSection">
			<td colspan="3">
				{html_person_section_account}
				<div></div>
			</td>
		</tr>
		<tr class="required lightSection">
			<td class="indent">&nbsp;</td>
			<td class="field"><span class="label">{html_person_field_email}</span></td>
			<td class="value">
				<input type="text" maxlength="128" name="email" value="{form_email}" /> <span class="help" look="width: 400px">{html_person_field_email_help}</span>
				<img class="privacyIcon clickable" _fieldId="privacy_email" onclick="privacyIconClicked(this)" src="{app_root_url}site/images/icon_avail_public.gif" /><input type="hidden" name="privacy_email" id="privacy_email" value="{form_privacy_email}" />
			</td>
		</tr>
		<tr class="lightSection">
			<td class="indent">&nbsp;</td>
			<td class="field"><span class="label">{html_person_field_language}</span></td>
			<td class="value"><select name="language" >{form_language}</select> <span class="help" look="width: 400px">{html_person_field_language_help}</span></td>
		</tr>
		<tr class="lightSection">
			<td class="indent">&nbsp;</td>
			<td class="field"><span class="label">{html_person_field_password}</span></td>
			<td class="value"><input type="password" name="newPassword" value="" /> <span class="help" look="width: 400px">{html_person_field_password_help}</span></td>
		</tr>
		<tr class="lightSection">
			<td class="indent">&nbsp;</td>
			<td class="field"><span class="label">{html_person_field_password_again}</span></td>
			<td class="value"><input type="password" name="newPasswordAgain" value="" /> <span class="help" look="width: 400px">{html_person_field_password_help}</span></td>
		</tr>
		<tr class="endSeparator lightSection">
			<td colspan="3">&nbsp;</td>
		</tr>
		<tr class="sectionSeparator darkSection">
			<td colspan="3">
				{html_person_section_contact}
				<div></div>
			</td>
		</tr>
		<tr class="darkSection">
			<td class="indent">&nbsp;</td>
			<td class="field"><span class="label">{html_person_field_web}</span></td>
			<td class="value">
				<input type="text" name="webUrl" value="{form_webUrl}" />
				<img class="privacyIcon clickable" _fieldId="privacy_web" onclick="privacyIconClicked(this)" src="{app_root_url}site/images/icon_avail_public.gif" /><input type="hidden" name="privacy_web" id="privacy_web" value="{form_privacy_web}" />
			</td>
		</tr>
		<tr class="darkSection">
			<td class="indent">&nbsp;</td>
			<td class="field"><span class="label">{html_person_field_phone}</span></td>
			<td class="value">
				<input type="text" name="phone" value="{form_phone}" />
				<img class="privacyIcon clickable" _fieldId="privacy_phone" onclick="privacyIconClicked(this)" src="{app_root_url}site/images/icon_avail_public.gif" /><input type="hidden" name="privacy_phone" id="privacy_phone" value="{form_privacy_phone}" />
			</td>
		</tr>
		<tr class="darkSection">
			<td class="indent">&nbsp;</td>
			<td class="field"><span class="label">{html_person_field_skype}</span></td>
			<td class="value">
				<input type="text" name="skypeId" value="{form_skypeId}" />
				<img class="privacyIcon clickable" _fieldId="privacy_skype" onclick="privacyIconClicked(this)" src="{app_root_url}site/images/icon_avail_public.gif" /><input type="hidden" name="privacy_skype" id="privacy_skype" value="{form_privacy_skype}" />
			</td>
		</tr>
		<tr class="darkSection">
			<td class="indent">&nbsp;</td>
			<td class="field"><span class="label">{html_person_field_facebook}</span></td>
			<td class="value"><input type="text" name="facebookUrl" value="{form_facebookUrl}" /></td>
		</tr>
		<tr class="endSeparator darkSection">
			<td colspan="3">&nbsp;</td>
		</tr>
		<tr class="buttons">
			<td class="indent">&nbsp;</td>
			<td class="field"></td>
			<td class="value">
				<input type="submit" class="button bigButton" value="{html_general_but_save}" />
				<input type="button" class="button bigButton" value="{html_general_but_cancel}" onclick="window.open('{link_cancel}', '_self');" />
			</td>
		</tr>
	</table>

</form>

</div>
</div>
</div>
<script type="text/javascript">
	alignWidthToFull('_formTable_{tmpId}', '_measureWidth_{tmpId}');

	// felulirjuk a privacy icon szovegeket
	privacyIconTitles[PRIVACY_NOBODY] = '{privacyIcon_nobody}';
	privacyIconTitles[PRIVACY_BRANDPERSONS] = '{privacyIcon_brandpersons}';
	privacyIconTitles[PRIVACY_PUBLIC] = '{privacyIcon_public}';
	
	initPrivacyControlls();
</script>
